<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>浏览图书信息</title>
    <style type="text/css">
        table{font-size:13px;line-height:25px;border-collapse: collapse;}
        table,table tr th, table tr td { border:1px solid #dddddd; }
    </style>
</head>
<body>
    <center>
        <h2>浏览图书信息</h2>
        <table width="95%">
            <tr style="background-color:#ddeedd;">
                <th>ID号</th>
                <th>标题</th>
                <th>作者</th>
                <th>出版社</th>
                <th>出版年</th>
                <th>单价</th>
                <th>评分</th>
            </tr>
            {% for book in booklist %}
                <tr>
                    <td>{{ book.id }}</td>
                    <td>{{ book.title }}</td>
                    <td>{{ book.author }}</td>
                    <td>{{ book.press }}</td>
                    <td>{{ book.imprint }}</td>
                    <td>{{ book.price }}</td>
                    <td>{{ book.score }}</td>
                </tr>
            {% endfor %}
        </table>

        <p>
        {% for pindex in plist %}
            {% if pIndex == pindex %}
                {{pindex}}&nbsp;&nbsp;
            {% else %}
                <a href="{% url 'index'%}?p={{ pindex }}">{{ pindex }}</a>&nbsp;&nbsp;
            {% endif %}
        {% endfor %}
    </center>
</body>
</html>